package com.uw.uwrpc.core.exception;

import lombok.Getter;
import lombok.ToString;

@ToString
@Getter
public enum ErrorCode {

    socket_timeout("T","001","http invoke timeout"),
    no_such_method("T","002","method not exists"),
    reflect_exception("T","003","reflect invoke failure"),
    undefined("U", "001", "undefined"),
    ;


    ErrorCode(String type, String code, String message) {
        this.type = type;
        this.code = code;
        this.message = message;
    }

    /**
     * "T": 技术类异常
     * "B": 业务类异常
     * "U": 搞不清楚，再归类到 T, B
     */
    private final String type;

    private final String code;
    private final String message;

}
